import { Injectable } from '@angular/core';
import { InMemoryDbService } from 'angular-in-memory-web-api';

@Injectable({
  providedIn: 'root'
})
export class TableDataService implements InMemoryDbService {
  createDb() {
    const lists = [
      {
        id: 1,
        firstName: 'Mark',
        lastName: 'Otto',
        userName: '@mdo',
        email: 'mdo@gmail.com',
        age: 21,
        bol: true
      }, {
        id: 2,
        firstName: 'Jacob',
        lastName: 'Thornton',
        userName: '@fat',
        email: 'fat@yandex.ru',
        age: 23,
        bol: true
      }, {
        id: 3,
        firstName: 'Larry',
        lastName: 'Bird',
        userName: '@twitter',
        email: 'twitter@outlook.com',
        age: 12,
        bol: true
      }, {
        id: 4,
        firstName: 'John',
        lastName: 'Snow',
        userName: '@snow',
        email: 'snow@gmail.com',
        age: 32,
        bol: true
      }, {
        id: 5,
        firstName: 'Jack',
        lastName: 'Sparrow',
        userName: '@jack',
        email: 'jack@yandex.ru',
        age: 25,
        bol: true
      }, {
        id: 6,
        firstName: 'Ann',
        lastName: 'Smith',
        userName: '@ann',
        email: 'ann@gmail.com',
        age: 29,
        bol: true
      }, {
        id: 7,
        firstName: 'Barbara',
        lastName: 'Black',
        userName: '@barbara',
        email: 'barbara@yandex.ru',
        age: 41,
        bol: true
      }, {
        id: 8,
        firstName: 'Sevan',
        lastName: 'Bagrat',
        userName: '@sevan',
        email: 'sevan@outlook.com',
        age: 36,
        bol: true
      }, {
        id: 9,
        firstName: 'Ruben',
        lastName: 'Vardan',
        userName: '@ruben',
        email: 'ruben@gmail.com',
        age: 47,
        bol: true
      }, {
        id: 10,
        firstName: 'Karen',
        lastName: 'Sevan',
        userName: '@karen',
        email: 'karen@yandex.ru',
        age: 32,
        bol: true
      },
    ];
    const primeData = [
      {
        name: 'James Butt',
        country: 'Algeria',
        agent: 'Ioni Bowcher',
        date: '09/13/2015',
        balance: '$70,663.00',
        status: 'Qualified',
        activity: 20
      }, {
        name: 'Josephine Darakjy',
        country: 'Egypt',
        agent: 'Amy Elsner',
        date: '02/09/2019',
        balance: '$82,429.00',
        status: 'New',
        activity: 25
      }, {
        name: 'Art Venere',
        country: 'Panama',
        agent: 'Asiya Javayant',
        date: '05/13/2017',
        balance: '$28,334.00',
        status: 'Unqualified',
        activity: 10
      }, {
        name: 'Lenna Paprocki',
        country: 'Slovenia',
        agent: 'Xuxue Feng',
        date: '09/15/2020',
        balance: '$88,521.00',
        status: 'New',
        activity: 25
      }, {
        name: 'Donette Foller',
        country: 'South Africa',
        agent: 'Asiya Javayant',
        date: '05/20/2016',
        balance: '$93,905.00',
        status: 'Proposal',
        activity: 25
      }, {
        name: 'Minna Amigon',
        country: 'Romania',
        agent: 'Anna Fali',
        date: '11/07/2018',
        balance: '$71,169.00',
        status: 'Qualified',
        activity: 40
      }, {
        name: 'Abel Maclead',
        country: 'Singapore',
        agent: 'Bernardo Dominic',
        date: '03/11/2017',
        balance: '$96,842.00',
        status: 'Qualified',
        activity: 60
      }, {
        name: 'Kiley Caldarera',
        country: 'Serbia',
        agent: 'Onyama Limba',
        date: '09/15/2020',
        balance: '$92,734.00',
        status: 'New',
        activity: 35
      }, {
        name: 'Graciela Ruta',
        country: 'Chile',
        agent: 'Amy Elsner',
        date: '05/20/2016',
        balance: '$93,905.00',
        status: 'Proposal',
        activity: 55
      }, {
        name: 'Mattie Poquette',
        country: 'Venezuela',
        agent: 'Anna Fali',
        date: '05/20/2016',
        balance: '$64,533.00',
        status: 'Negotiation',
        activity: 80
      }
    ];

    return {lists, primeData};
  }

  constructor() { }
}
